﻿using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Text;

namespace Publicuse.Entity
{
    /// <summary>
    /// 异步实体模型
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class AsyncModel<T>
    {
        public AsyncModel(int pageIndex = 1, int pageSize = 10)
        {
            this.pageIndex = pageIndex;
            this.pageSize = pageSize;
        }

        public DeleteResult deleteResult { get; set; } = null;

        public UpdateResult updateResult { get; set; } = null;

        public int pageIndex { get; set; } = 1;

        public string msg { get; set; }
        public int pageSize { get; set; } = 10;

        public long count { get; set; } = 0;

        public T entity { get; set; } = default(T);

        public List<T> list { get; set; } = default(List<T>);
    }
}
